package com.aisa.docktest;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.asia.db.dbdemo;
import com.asia.redis.testRedis;

/**
 * Servlet implementation class for Servlet: HelloServlet
 *
 */
 public class HelloServlet extends javax.servlet.http.HttpServlet 
     implements javax.servlet.Servlet {

    /* (non-Java-doc)
	 * @see javax.servlet.http.HttpServlet#HttpServlet()
	 */
	public HelloServlet() {
		super();
	}   	
	   
	/* (non-Java-doc)
	 * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest request, 
	     HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) 
	    throws ServletException, IOException {
		
		response.getWriter().write("Hello, docktest!"+"");
		response.getWriter().write("redisinfo:"+testRedis.testMap()+"<br/>");
		response.getWriter().write("mysqlinfo:"+testRedis.testMap()+"<br/>");
		for (int i=0 ;i<dbdemo.querytest().size(); i++){
			response.getWriter().write(dbdemo.querytest().get(i)+"<br/>");
		}
		
		
	}  	
	
	/* (non-Java-doc)
	 * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest request, 
	     HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) 
	    throws ServletException, IOException {
		// TODO Auto-generated method stub
	}   	  	    
}